import request from '@/utils/request'

// 查询酒店订单列表
export function listHotelorder(query) {
  return request({
    url: '/boot/hotelorder/list',
    method: 'get',
    params: query
  })
}

// 查询酒店订单详细
export function getHotelorder(hotelOrderId) {
  return request({
    url: '/boot/hotelorder/' + hotelOrderId,
    method: 'get'
  })
}

// 新增酒店订单
export function addHotelorder(data) {
  return request({
    url: '/boot/hotelorder',
    method: 'post',
    data: data
  })
}

// 修改酒店订单
export function updateHotelorder(data) {
  return request({
    url: '/boot/hotelorder',
    method: 'put',
    data: data
  })
}

// 删除酒店订单
export function delHotelorder(hotelOrderId) {
  return request({
    url: '/boot/hotelorder/' + hotelOrderId,
    method: 'delete'
  })
}

// 获取酒店订单下拉选项列表
export function getHotelorderOptions() {
  return request({
    url: '/boot/hotelorder/options',
    method: 'get'
  })
}

// 创建酒店订单（包含库存更新）
export function createHotelOrder(data) {
  return request({
    url: '/boot/hotelorder/create',
    method: 'post',
    data: data
  })
}
